import { http1 } from '@/utils/http'
import type { mylogin } from '@/types/my'
// 获取社区界面
export const shequAPI = (obj) => {
  console.log('liaotian发送了请求')

  // 聊天列表请求
  return http1<any>({
    method: 'POST',
    url: `/api/shequ`,
    data: obj,
  })
}

  // 社区上列表
export const shequListAPI = () => {
  return http1<any>({
    method: 'GET',
    url: `/api/shequlist`,
  })
}

// 刷新下页的数据
export const shequListAPI2 = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/shequ2`,
    data: obj,
  })
}
// 关注 社区
export const guanzhushequAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/guanzhushequ`,
    data: obj,
  })
}
// 点赞接口
export const zanAPI = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/like`,
    data: obj,
  })
}

// 获取话题的列表标签
export const getTopicListTagAPI = () => {
  return http1<any>({
    method: 'get',
    url: `/api/getTopicListTag`,
  })
}
// 发布文章的接口
export const publishArticleAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/publishArticle`,
    data: obj,
  })
}
// 获取文章详情数据
export const publishwenzAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/publishwenzAPI`,
    data: obj,
  })
}
// 获取文章的评论

export const publipinglunAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/publipinglunAPI`,
    data: obj,
  })
}
// 发布评论
export const fabupinglunAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/fabupinglunAPI`,
    data: obj,
  })
}
// 获取帖子个人中心
export const getTopicListAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/getTopicListAPI`,
    data: obj,
  })
}
// 获取贴子上的关注和粉丝数量
export const getTopicListAPI2 = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/getTopicListAPI2`,
    data: obj,
  })
}
// 获取搜索数据
export const getsearchAPI = (obj) => {
  return http1<any>({
    method: 'post',
    url: `/api/getsearchAPI`,
    data: obj,
  })
}
// 获取搜索好友
export const getsearchhaoyouAPI = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/getsearchhaoyouAPI`,
    data: obj,
  })
}

// 社区搜索历史数据
export const getsearchshequAPI = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/getsearchshequAPI`,
    data: obj,
  })
}
// 获取红点
export const gethonidanAPI = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/gethonidanAPI`,
    data: obj,
  })
}
// 获取消息红点
export const gethonidanxinxiAPI = (obj) => {
  return http1<any>({
    method: 'POST',
    url: `/api/gethonidanxinxiAPI`,
    data: obj,
  })
}
